function config($stateProvider,$urlRouterProvider,$ocLazyLoadProvider){
    $urlRouterProvider.otherwise("index")
    $stateProvider
        .state("index",{
            url:"/index",
            templateUrl:"./tpls/index.html",
            controller:"indexController"
        })
        .state("index.home",{
            url:"/home",
            templateUrl:"./tpls/home.html",
            controller:homeController,
            resolve:{
                loadPlugin:function($ocLazyLoad){
                    return $ocLazyLoad.load([{
                        files:["./css/style/yang/home.css","./css/style/yang/font-awesome.css","./css/swiper-3.4.0.min.css"]
                    }])
                }
            }
        })
        .state("index.community",{
            url:"/community",
            templateUrl:"./tpls/community.html",
            controller:communityController,
            resolve:{
            }
        })
        .state("index.add",{
            url:"/add",
            templateUrl:"./tpls/add.html",
            controller:addController,
            resolve:{
            }
        })
        .state("index.mall",{
            url:"/mall",
            templateUrl:"./tpls/mall.html",
            controller:mallController,
            resolve:{
            }
        })
        .state("index.my",{
            url:"/my",
            templateUrl:"./tpls/my.html",
            controller:myController,
            resolve:{
            }
        })

}
angular.module("myApp")
    .config(config)